<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Strict.dtd">
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ page
	import="com.onlineMIS.common.Common_util,java.util.Date,java.text.SimpleDateFormat"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<title>禧乐仓连锁店管理信息系统</title>
<%@ include file="../../common/Style.jsp"%>
<script>

var dataGrid ;
$(document).ready(function(){
	parent.$.messager.progress('close'); 
	
	var params = $.serializeObject($('#searchForm'));

	dataGrid = $('#dataGrid').datagrid({
		url : 'basicDataJSON!selectSystemConfig',
		queryParams: params,
		fit : true,
		border : false,
		pagination : true,
		pageSize : 10,
		pageList : [ 10, 20],		
		checkOnSelect : false,
		selectOnCheck : false,
		singleSelect:false,
		nowrap : false,
		singleSelect:false,
		showFooter:true,
		rownumbers : true,
		sortName : '',
		sortOrder : 'asc',
		rowStyler: function(index,row){
			var style = "";
			if (row.status == 1)
				style += 'color:red;';

			return style;
		},
		columns : [ [
			{	
				field : 'id',
				title : 'ID',
				width : 30
			},
 		    {	
				field : 'configName',
				title : '配置名字',
				width : 200,
				sortable:true,
				order:'desc'
			},{	
				field : 'configCode',
				title : '配置编码',
				width : 200			
			},{	
				field : 'value',
				title : '配置详情',
				width : 250			
			}, {
				field : 'comment',
				title : '备注信息',
				width : 250
			}, {
				field : 'statusS',
				title : '状态',
				width : 80,
				sortable:true			
			},{
				field : 'typeS',
				title : '配置类型',
				width : 80,
				sortable:true			
			}, {
				field : 'createBy',
				title : '创建人',
				width : 80,
				sortable:true			
			},{
				field : 'createTime',
				title : '创建时间',
				width : 150,
				sortable:true			
			},{
				field : 'updateBy',
				title : '修改人',
				width : 80,
				sortable:true			
			},{
				field : 'updateTime',
				title : '修改时间',
				width : 150,
				sortable:true			
			},{				
				field : 'action',
				title : '编辑',
				width : 50,
			formatter : function(value, row, index) {
				var str = '';

					str += $.formatString('<a href="#" onclick="updateSystemConfig(\'{0}\');"><img border="0" src="{1}" title="更改客户信息"/></a>', row.id, '<%=request.getContextPath()%>/conf_files/easyUI/themes/icons/update.png');
								
				return str;
			}
		}]],
		toolbar : '#toolbar',
	});

});


function BSkeyDown(e){

	var ieKey = event.keyCode;
	        
} 

document.onkeydown = BSkeyDown; 


function AddSystemConfig(){
	var params = "";

	$.modalDialog.opener_dataGrid = dataGrid;
	
	$.modalDialog({
		title : "新增配置信息",
		width : 680,
		height : 340,
		modal : false,
		draggable:false,
		href : 'userJSP!updateSystemConfig?formBean.config.id=0',
		
	});
}
function updateSystemConfig(id){
	var params = "formBean.config.id=" + id;
	$.modalDialog({
		title : "更新配置信息",
		width : 680,
		height : 340,
		modal : false,
		draggable:false,
		href : 'userJSP!updateSystemConfig?' + params,
		
	});
}

/**
 * 回调
 */
function callBack(data){
	$.messager.alert('提示',data.message);
	
}

function findSystemConfig(){
	dataGrid.datagrid('load', $.serializeObject($('#searchForm')));
}


</script>
</head>
<body>
<div class="easyui-layout" data-options="fit : true,border : false">
	<div data-options="region:'north',border:false" style="height: 75px;">
	<s:form id="searchForm" name="searchForm"
		theme="simple" method="POST">
		<table width="95%" align="center" class="OuterTable">
			<tr>
				<td>
					<table width="100%" border="0">
						<tr>
							<td height="50" colspan="7">
								<table width="100%" border="0">
									<tr class="PBAOuterTableTitale">
										<td height="51" colspan="9">总部系统配置信息<br /> -
											总部管理人员通过此功能可以查看系统配置信息详情
										</td>
									</tr>
									
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		</s:form>
	</div>	
	<div data-options="region:'center',border:false">
		<table id="dataGrid">
		</table>
			<div id="toolbar" style="display: none;">
				<a onclick="AddSystemConfig();" href="javascript:void(0);"
					class="easyui-linkbutton"
					data-options="iconCls:'icon-search',plain:true">新增配置</a> 

			</div>
		</div>
	
</div>
	
</body>
</html>